layui.use(['rate'],function () {
    var rate = layui.rate;
    //只读
    rate.render({
        elem: '.test9'
        ,value: 4.5
        ,readonly: true
        ,half: true
        ,theme: '#ff6633'
    });
});
layui.use(['laypage', 'layer'], function() {
    var laypage = layui.laypage
        , layer = layui.layer;

    //总页数低于页码总数
    laypage.render({
        elem: 'demo0', count: 50,theme: '#FF6633' //数据总数
    });

    document.querySelector("#demo0").onclick= function(event){
        var ele = event.target;
        console.log(  ele.innerText); //获得页码
        if(ele.nodeName =='EM'){
            //  console.log(  ele.innerText); //获得页码
        }
    }

});
var liEle=document.querySelector(".shop-l").children;
for(var i=0;i<liEle.length;i++){
    if(i%2==1&&i!=0){
        liEle[i].style.backgroundColor="#FFFFFF";
    }
}

$(".filt-service").click(function (event) {
    var ele = event.target;
    if(ele.className=='icon-arr-down'){
        ele=ele.parentElement;
    }
    if(ele.parentElement.nodeName=='LI'){
        var liEle=ele.parentElement.parentElement.children;
        liEle[0].firstElementChild.classList.remove('cur');
        liEle[1].firstElementChild.classList.remove('cur');
        ele.classList.add('cur');
        if(ele.parentElement==liEle[1]){
            ele.lastElementChild.style.backgroundImage="url('../images/shop_img/icon2.svg')";
        }
        else {
            ele.parentElement.parentElement.lastElementChild.lastElementChild.lastElementChild.removeAttribute("style");
        }
    }
});